//---------------------------------------------------------------------------

#ifndef ConvexoH
#define ConvexoH
#include "Obstaculo.h"
#include "list.h"
#include "Segmento.h"

class Convexo : Obstaculo{
private:
        list<Segmento*> *_listaSegmentos;
        list<Segmento*> *_flotador;
        PV2D* _centro;
        GLdouble _lado;
        GLint _numero_lados;

        void eliminaSegmentos();
        void eliminaFlotador();
        static list<Segmento*>* arco(PV2D*,double,double,double);

public:
        Convexo(list<Segmento*>*,list<Segmento*>*);
        Convexo(PV2D*,GLdouble,GLint);
        ~Convexo();

        void intersecar(bool&,double&,PV2D*&,Pelota*);
        void pintaObstaculo(bool);

        static Convexo* obstaculoConvexo1();
};

//---------------------------------------------------------------------------
#endif
